#include "session.h"

Session::Session()
{
}

Session::Session(Session *session)
{
    // Create session based on another
    host = session->getHost();
    userName = session->getUserName();
    sessionStartAt = session->getSessionStartAt();
    sessionDuration = session->getSessionDuration();
}

void Session::setHost(QString host)
{
    this->host = host;
}

void Session::setUserName(QString userName)
{
    this->userName = userName;
}

void Session::setSessionStartAt(int sessionStartAt)
{
    this->sessionStartAt = sessionStartAt;
}

void Session::setSessionDuration(int sessionDuration)
{
    this->sessionDuration = sessionDuration;
}

void Session::addPage(QString page)
{
    pages.append(page);
}

void Session::addTimestamp(int timestamp)
{
    timestamps.append(timestamp);
}

QString Session::getHost()
{
    return this->host;
}

QString Session::getUserName()
{
    return this->userName;
}

QStringList &Session::getPages()
{
    return this->pages;
}

QList<int> &Session::getTimestamps()
{
    return this->timestamps;
}

int Session::getSessionDuration()
{
    return this->sessionDuration;
}

int Session::getSessionStartAt()
{
    return this->sessionStartAt;
}
